FORMAT: 1A
HOST: http://localhost:3000

# Go Game

这是关于golang项目game的接口文档。

# Group Users

用户服务。

## Matches Collection [/matches]

查询所有用户的状态。
### List ALL Matches [GET]

列出所有激活的用户。

+ Response 200 (application/json)

        [
            {
                "id": "424333543-546545",
                "started_at": 16546546,
                "turn": 27,
                "gridsize": 19,
                "playWhite": "bob",
                "playerBlack": "alfred"
            }
        ]

### Start a New Match [POST]

You can create a new match with this action. It takes information about the players and will set up a new game. The game will start at round 1, and it will be **black**'s turn to
play. Per standard Go rules, **black** plays first.

+ Request (application/json)

        {
            "gridsize" : 19,
            "playerWhite" : "bob",
            "playerBlack" : "alfred"
        }

+ Response 201 (application/json)

    + Headers

            Location: /matches/5a003b78-409e-4452-b456-a6f0dcee05bd

    + Body

            {
                "id" : "5a003b78-409e-4452-b456-a6f0dcee05bd",
                "started_at": 13231239123391,
                "gridsize" : 19,
                "playerBlack" : "alfred",
                "playerWhite" : "bob"
            }

## Match Status [/matches/{match_id}/{time}]

Use the match status resource to interrogate various aspects of an individual running match.

+ Parameters

    + match_id: `5a003b78-409e-4452-b456-a6f0dcee05bd` (string) - 这是一个注册用的ID。
    + time: `654646` (string) - 这是系统时间。


### 获取指定用户的状态 [GET]

输入用户的ID来查询用户的所有状态

+ Response 200 (application/json)

        {
            "id" : "5a003b78-409e-4452-b456-a6f0dcee05bd",
            "time" : "654646",
            "started_at": 13231239123391,
            "gridsize" : 6,
            "turn" : 0,
            "playerWhite" : "bob",
            "playerBlack" : "alice"
        }
    
+ Response 401 (application/json)